package com.java.module.fire.service.impl;

import java.util.List;
import com.java.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.java.module.fire.mapper.ProjectMapper;
import com.java.module.fire.domain.Project;
import com.java.module.fire.service.IProjectService;

/**
 * 匹配信息Service业务层处理
 * 
 * @author Administrator
 * @date 2025-02-10
 */
@Service
public class ProjectServiceImpl implements IProjectService {
    @Autowired
    private ProjectMapper projectMapper;

    /**
     * 查询匹配信息
     * 
     * @param projectId 匹配信息ID
     * @return 匹配信息
     */
    @Override
    public Project selectProjectById(Long projectId) {
        return projectMapper.selectProjectById(projectId);
    }

    /**
     * 查询匹配信息
     *
     * @param project 匹配信息
     * @return 匹配信息
     */
    @Override
    public Project selectProjectOne(Project project) {
        return projectMapper.selectProjectOne(project);
    }

    /**
     * 查询匹配信息列表
     * 
     * @param project 匹配信息
     * @return 匹配信息
     */
    @Override
    public List<Project> selectProjectList(Project project) {
        return projectMapper.selectProjectList(project);
    }

    /**
     * 新增匹配信息
     * 
     * @param project 匹配信息
     * @return 结果
     */
    @Override
    public int insertProject(Project project) {
        project.setCreateTime(DateUtils.getNowDate());
        return projectMapper.insertProject(project);
    }

    /**
     * 修改匹配信息
     * 
     * @param project 匹配信息
     * @return 结果
     */
    @Override
    public int updateProject(Project project) {
        project.setUpdateTime(DateUtils.getNowDate());
        return projectMapper.updateProject(project);
    }

    /**
     * 批量删除匹配信息
     * 
     * @param projectIds 需要删除的匹配信息ID
     * @return 结果
     */
    @Override
    public int deleteProjectByIds(Long[] projectIds) {
        return projectMapper.deleteProjectByIds(projectIds);
    }

    /**
     * 删除匹配信息信息
     * 
     * @param projectId 匹配信息ID
     * @return 结果
     */
    @Override
    public int deleteProjectById(Long projectId) {
        return projectMapper.deleteProjectById(projectId);
    }
}
